<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<form method="post">
    记住一定要加csrf_token,否则校验一定不会通过的
    {{form.csrf_token}}

    {{form.username.label}}
    {{form.username}}
    <!--当这里验证不通过时,会提示错误信息,因为是列表,所以用遍历的方式获取-->
    {% for err in form.username.errors %}
    {{err}}
    {% endfor %}

    <br>
    {{form.password.label}}
    {{form.password}}
    {% for err in form.password.errors %}
    {{err}}
    {% endfor %}

    <br>
    {{form.password2.label}}
    {{form.password2}}


    {% for err in form.password2.errors %}
    {{err}}
    {% endfor %}


    <br>
    {{form.submit}}
</form>



调用macro宏
{% import 'macro.html' as fun %}
{{ fun.input1(size=50) }}
{{ fun.input1() }}


























</body>
</html>